# CMakeLists.txt
cmake_minimum_required(VERSION 3.9)
project(jiajia)

# 开启 debug 模式
SET(CMAKE_BUILD_TYPE "Debug")

# yu 库
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/yu)

# jiajia 头文件
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)

# jiajia 源代码
aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR}/src JIAJIA_SRC_LIST)
add_library(JIAJIA STATIC ${JIAJIA_SRC_LIST})
target_include_directories(JIAJIA PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include)
target_link_libraries(JIAJIA YU)

# 添加执行文件
add_executable(main main.c)

# 链接库
target_link_libraries(main YU)
target_link_libraries(main JIAJIA)
